<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

//Route::middleware('auth:api')->get('/user', function (Request $request) {
//    return $request->user();
//});

Route::group(['prefix' => 'v1'], function () {
    Route::group(['prefix' => 'portrait'], function () {
        Route::get('portrait', 'PortraitController@index')->name('api.portrait.portrait');
        Route::get('overall', 'PortraitController@overall')->name('api.portrait.overall');
        //部门相关
        Route::get('departments', 'DepartmentController@all')->name('api.portrait.departments');
        Route::get('departments/tree', 'DepartmentController@tree')->name('api.portrait.departments.tree');
        //数据记录统计相关
        Route::get('record-statistics', 'RecordController@statistics')->name('api.portrait.records.statistics');
        Route::get('overall', 'RecordController@overall')->name('api.portrait.overall');
        Route::get('department', 'RecordController@department')->name('api.portrait.department');
        Route::get('trend', 'TrendController@index')->name('api.portrait.trend');

        //人员画像
        Route::get('people/search', 'PeopleController@search')->name('api.portrait.people.search');
        Route::get('people', 'PeopleController@index')->name('api.portrait.people');
        //员工信息
        Route::get('people/info', 'PeopleController@info')->name('api.portrait.people.info');


    });
});
